{extend name="layout" /}
{block name="body"}
  <div class="row">
    <div class="col-lg-12">
      <div class="card">
        <div class="card-body">
          
          <form method="post" action="{:url('profile')}" class="site-form edit-form row">
            {php}
            $form = ['title' => '修改头像', 'name' => 'avatar', 'value' => $info['avatar'], 'remark' => '选择一张你喜欢的图片，上传并裁剪作为头像，请尽量将头像裁剪为正方形。'];
            {/php}
            {include file="../application/admin/view/form/cropavatar.html" type='' /}
            <div class="form-group col-md-12 mb-0"><hr/></div>
            <div class="form-group col-md-12">
              <label for="adminname">用户名</label>
              <input type="text" class="form-control" name="adminname" id="adminname" value="{$info.adminname}" disabled="disabled">
              <small class="form-text text-muted">用户名不允许修改。</small>
            </div>
            <div class="form-group col-md-12">
              <label for="nickname">昵称</label>
              <input type="text" class="form-control" name="nickname" id="nickname" placeholder="输入您的昵称" value="{$info.nickname}">
            </div>
            <div class="form-group col-md-12">
              <label for="email">邮箱</label>
              <input type="email" class="form-control" name="email" id="email" placeholder="请输入正确的邮箱地址" value="{$info.email}">
              <small class="form-text text-muted">请保证您填写的邮箱地址是正确的。</small>
            </div>
            <div class="form-group col-md-12">
              <label for="remark">简介</label>
              <textarea class="form-control" name="remark" id="remark" rows="3">{$info.remark}</textarea>
            </div>
            <div class="form-group col-md-12">
              <input type="hidden" name="id" value="{$aid}" />
              <button type="submit" class="btn btn-primary m-r-5 ajax-post" target-form="edit-form">保 存</button>
              <button type="button" class="btn btn-default" onclick="javascript:history.back(-1);return false;">返 回</button>
            </div>
          </form>
 
        </div>
      </div>
    </div>
    
  </div>
{/block}
{block name="otherjs"}
{include file="../application/admin/view/form/formjs.html" /}
{/block}